package com.ude.pim.service;

import com.ude.pim.common.R;
import com.ude.pim.dto.CaseSubDTO;
import com.ude.pim.dto.CaseSubQueryDTO;
import com.ude.pim.entity.CaseSub;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yb
 * @since 2023-08-08
 */
public interface CaseSubService extends IService<CaseSub> {
    public R<List<CaseSub>> page(CaseSubQueryDTO caseSubQueryDTO);

    R<List<CaseSubDTO>> getByChargeId(Long chargeId);

    R<List<CaseSubDTO>> getList();

    R<List<CaseSubDTO>> getByCaseId(Long caseId);

    //根据子流程信息的专案ID获取专案名称
    public String getCaseName(Long caseId);

    //根据子流程信息的子流程ID获取子流程名称
    public String getSubName(Integer subId);

    //根据id给指定阶段添加外界因素延期时间
    public Boolean addUnforcedDays(Long id,Integer days);

    //根据id给指定阶段添加人为因素延期时间
    public Boolean addApplyDelay(Long id, Integer days);

    //获取子流程的预计完成时间
    public LocalDateTime getPredictTime(Long id);

    public Boolean setFinish(Long id,LocalDateTime t);

    void startNext(Long caseSubId);
}
